﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using JM.JCY.Common;
using NCS.IConnect.PolicyInjection.CallHandlers;
using JM.JCY.BusinessComponent;
using JM.JCY.BusinessEntity;
using JM.JCY.DataAccess;

namespace JM.JCY.BusinessFacade
{
    public class EventBF : JCYBusinessFacadeBase<EventBC>, IEvent
    {
        public EventBF()
            : base(new EventBC())
        {
        }

        public void UpdateEvent(EventDataset.T_EventDataTable dt)
        {
            this.BusinessComponent.UpdateEvent(dt);
        }

        public void UpdateEventReceiver(EventDataset.T_Event_ReceiverDataTable dt)
        {
            this.BusinessComponent.UpdateEventReceiver(dt);
        }

        public EventDataset.T_Event_S_ByReceiverDataTable GetEventByReceiver(string subject, int receiverId, DateTime? startDate, DateTime? endDate, string status)
        {
            return this.BusinessComponent.GetEventByReceiver(subject, receiverId, startDate, endDate, status);
        }

        public EventDataset.T_Event_S_BySenderDataTable GetEventBySender(string subject, int senderId, DateTime? startDate, DateTime? endDate, string status)
        {
            return this.BusinessComponent.GetEventBySender(subject, senderId, startDate, endDate, status);
        }

        public EventDataset.T_EventDataTable GetEventDetailById(int eventId)
        {
            return this.BusinessComponent.GetEventDetailById(eventId);
        }

        public EventDataset.T_Event_ReceiverDataTable GetEventReceiverById(int eventId)
        {
            return this.BusinessComponent.GetEventReceiverById(eventId);
        }

        public EventDataset.T_Event_ReceiverDataTable GetEventReceiverByReceiverId(int receiverId)
        {
            return this.BusinessComponent.GetEventReceiverByReceiverId(receiverId);
        }

        public EventDataset.T_EventDataTable GetEventForHome(int count, int receiverId)
        {
            return this.BusinessComponent.GetEventForHome(count, receiverId);
        }

        public EventDataset.T_EventDataTable GetMyEvent(string userName, string status, string type)
        {
            return this.BusinessComponent.GetMyEvent(userName, status, type);
        }
    }
}
